package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: H_tao_X
 * Date: 2022-07-17
 * Time: 20:31
 */

@Component
public class ReadYml {

    @Value("${mystring1}")
    private String str1;

    @Value("${mystring2}")
    private String str2;

    @Value("${mystring3}")
    private String str3;

    @PostConstruct
    public void func() {
        System.out.println("mystring1: " + str1);
        System.out.println("mystring2: " + str2);
        System.out.println("mystring3: " + str3);
    }
}
